<?php
    namespace App\Controller;
	use \Psr\Http\Message\ServerRequestInterface as Request;
    use \Psr\Http\Message\ResponseInterface as Response;
    use App\Model\UserModel;
	class AuthController extends BaseController{
		public function CheckUser($user,$urlpath){
			$user=new UserModel();
			$sql="select controlleraction from user 
			inner join rolrpower
			on `user`.rolrid=rolrpower.rolrid
			inner join power
			on rolrpower.power=Power.id
			where username='zhangsan'"
			$user->query();
		}
		public function getMenu($request, $response, $args){
//			$user=new UserModel();
//			$sql="SELECT menu.MenuName,lv FROM user
//			INNER JOIN rolr
//			ON `user`.RolrID=rolr.ID
//			INNER JOIN rolrpower
//			ON rolrpower.RolrID=rolr.ID
//			INNER JOIN power
//			ON rolrpower.Power=power.ID
//			INNER JOIN menu
//			ON menu.ID=ActionId
//			WHERE Email='".$_SESSION['UserEmail']."' AND ActionType='menu'";
//			$user->query();
            echo json_encode([
               'code'=>1
            ]);
		}
	}